import 'package:flutter/material.dart';

class LearnBaseRouterBPage extends StatefulWidget {
  const LearnBaseRouterBPage({super.key});
  @override
  State<LearnBaseRouterBPage> createState() => _LearnBaseRouterBPageState();
}

class _LearnBaseRouterBPageState extends State<LearnBaseRouterBPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          backgroundColor: Theme.of(context).colorScheme.inversePrimary,
          title: const Text("B页面"),
        ),
        body:Center(
          child:Column(
            children: [
              TextButton(onPressed:()=>{
                Navigator.pop(context)
              }, child: const Text("返回")),
              TextButton(onPressed:()=>{
                Navigator.pushNamed(context, '/C')
              }, child: Text("C页面")),
            ],
          ),
        )
      // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
